<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="java.io.File" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Index.jsp</title>
</head>
<body>
<center>
<h1>Download File Example</h1>

<% 
File file=new File(request.getRealPath("/WEB-INF/files"));
String files[]=file.list();
if(files==null||files.length==0)
{
%>
<font color="red" size="5">NO Files To DOwnload<br/>
Place some files in the <font color="blue">files</font>Directrory under WEB-INF
</font>


<%
}
else
{
for(int i=0;i<files.length;i++)
{
%>

<form action="download.jlc" method="post">
<input type="hidden" name="fileName" value="<%=files[i]%>">
<input type="submit" style="font-size:20" value="<%=files[i] %>">
</form>
<%
}
}
%>
</center>

</body>
</html>